<html>
<head><meta charset="utf-8"><title>Lifetime Fixes · wg-async-foundations · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/index.html">wg-async-foundations</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html">Lifetime Fixes</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="160737488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160737488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160737488">(Mar 13 2019 at 23:39)</a>:</h4>
<p>So I've made it a decent ways into getting <code>async fn</code>return types to lower using <code>existential type</code> directly rather than going through the existing machinery for <code>-&gt; impl Trait</code></p>



<a name="160737546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160737546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160737546">(Mar 13 2019 at 23:40)</a>:</h4>
<p>however, I've hit some bits that I'm not quite sure the best way to resolve and I wanted to post about them here while I thought to check if anyone had any brilliant ideas</p>



<a name="160737559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160737559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160737559">(Mar 13 2019 at 23:40)</a>:</h4>
<p>One of them is that the return type for an <code>async fn</code> can itself be an <code>impl Trait</code></p>



<a name="160737575"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160737575" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160737575">(Mar 13 2019 at 23:41)</a>:</h4>
<p>today we lower the return type using the function's DefId in order to resolve its generic parameters</p>



<a name="160737598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160737598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160737598">(Mar 13 2019 at 23:41)</a>:</h4>
<p>Ideally it would shift to (at least conceptually) have its parent generics provided by the <code>existential type</code> used for async fn</p>



<a name="160737658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160737658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160737658">(Mar 13 2019 at 23:42)</a>:</h4>
<p>however, we assume in a bunch of places that <code>impl Trait</code> types have a parent that is a function (<em>specifically a function</em>) in order to pull out its generics</p>



<a name="160737667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160737667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160737667">(Mar 13 2019 at 23:43)</a>:</h4>
<p>and changing all of that feels rather more intrusive than what I'd originally hoped.</p>



<a name="160738071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160738071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160738071">(Mar 13 2019 at 23:50)</a>:</h4>
<p>One option would be to leave <code>impl_trait_fn</code> for the <code>ExistTy</code> set to the parenting function, which would cause it to pick up generic parameters from it directly</p>



<a name="160738088"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160738088" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160738088">(Mar 13 2019 at 23:51)</a>:</h4>
<p>But I haven't tried that yet, so I'm not sure what it'll destroy ;)</p>



<a name="160754752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160754752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nemo157 <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160754752">(Mar 14 2019 at 06:12)</a>:</h4>
<p>Sounds like having the extension to allow nested <code>impl Trait</code> in existential types would be useful</p>



<a name="160797886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160797886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160797886">(Mar 14 2019 at 16:29)</a>:</h4>
<p><span class="user-mention" data-user-id="210267">@Nemo157</span> presumably that would desugar away at lowering time, which is where I am anyways</p>



<a name="160797894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160797894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160797894">(Mar 14 2019 at 16:29)</a>:</h4>
<p>But I think the fix I was suggesting worked</p>



<a name="160797912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160797912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160797912">(Mar 14 2019 at 16:29)</a>:</h4>
<p>the generics still seem to be getting picked up properly</p>



<a name="160835364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160835364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160835364">(Mar 15 2019 at 00:19)</a>:</h4>
<p>This function is an interesting case:<br>
<code>fn foo&lt;'a&gt;(x: &amp;u8, _: &amp;'a u8) -&gt; (&amp;u8, &amp;'a u8) { (x, &amp;5) }</code></p>



<a name="160835370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160835370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160835370">(Mar 15 2019 at 00:19)</a>:</h4>
<p>because it compiles if you remove the second argument</p>



<a name="160835438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160835438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160835438">(Mar 15 2019 at 00:20)</a>:</h4>
<p>so we actually need to track whether or not named lifetimes are used in the arguments when deciding whether or not it's valid to replace elided lifetimes in the output with the name of the fresh lifetime we introduced for the argument-position elided lifetime</p>



<a name="160835466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160835466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160835466">(Mar 15 2019 at 00:21)</a>:</h4>
<p>If there's exactly one fresh elided lifetime introduced in the arguments, we replace the non-dyn elided lifetimes in the output</p>



<a name="160835524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/160835524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#160835524">(Mar 15 2019 at 00:22)</a>:</h4>
<p>but if there are zero or more than one fresh lifetimes introduced, or if any named lifetimes are introduced, we want to error if we see an elided lifetime in the output</p>



<a name="161110889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161110889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161110889">(Mar 19 2019 at 00:58)</a>:</h4>
<p>I've opened <a href="https://github.com/rust-lang/rust/pull/59286" target="_blank" title="https://github.com/rust-lang/rust/pull/59286">https://github.com/rust-lang/rust/pull/59286</a> with the refactoring we discussed</p>
<div class="codehilite"><pre><span></span>existential type Foo&lt;&#39;a, &#39;b&gt;:;
fn foo&lt;&#39;a, &#39;b&gt;(_: &amp;&#39;a u8, _: &amp;&#39;b u8) -&gt; Foo&lt;&#39;a, &#39;b&gt; { () }
</pre></div>



<a name="161110891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161110891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161110891">(Mar 19 2019 at 00:58)</a>:</h4>
<p>however this code doesn't compile ^</p>



<a name="161110898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161110898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161110898">(Mar 19 2019 at 00:58)</a>:</h4>
<p>so naturally the <code>async fn</code> that I just made desugar to that also does not compile XD</p>



<a name="161110981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161110981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161110981">(Mar 19 2019 at 01:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> and <span class="user-mention" data-user-id="124288">@oli</span> do either of you have thoughts on the best approach to fixing that error? I'm not aware of a "minimal intersection of the following lifetimes" function or a way to write it today, but I can continue to hunt around.</p>



<a name="161130093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161130093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161130093">(Mar 19 2019 at 08:23)</a>:</h4>
<p>Do you have a <code>-Ztreat-err-as-bug</code> backtrace on that error?</p>



<a name="161159098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159098">(Mar 19 2019 at 15:10)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> </p>
<blockquote>
<p>WIP because this doesn't currently successfully allow multiple<br>
argument-position elided lifetimes since existential type<br>
doesn't yet support multiple lifetimes where neither outlive<br>
the other:</p>
</blockquote>
<p>Oh yeah, that's true =) argh</p>



<a name="161159167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159167">(Mar 19 2019 at 15:10)</a>:</h4>
<p>for some reason we overlooked this earlier, I guess</p>



<a name="161159227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159227">(Mar 19 2019 at 15:11)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> to confirm, though, if you have a relationship between them (e.g., <code>'a: 'b</code>) then it <em>does</em> work?</p>



<a name="161159405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159405">(Mar 19 2019 at 15:13)</a>:</h4>
<p>To put this another way, there were a variety of lifetime-related limitations, I <em>think</em> this refactoring should improve at least <em>some</em> of them, right? (and hopefully fixes the interactions with dyn trait objects)</p>



<a name="161159528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159528">(Mar 19 2019 at 15:15)</a>:</h4>
<p>Yes, this refactoring fixes a number of things</p>



<a name="161159534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159534">(Mar 19 2019 at 15:15)</a>:</h4>
<p>Anyway, there is no "minimal intersection" of the lifetimes fn to find, indeed. That particular example is not a very good one in terms of showing the challenge.</p>



<a name="161159545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159545">(Mar 19 2019 at 15:15)</a>:</h4>
<p>i.e., the "hidden" type there is <code>()</code>, iiuc</p>



<a name="161159546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159546">(Mar 19 2019 at 15:15)</a>:</h4>
<p>which of course has no lifetimes at all</p>



<a name="161159556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159556">(Mar 19 2019 at 15:15)</a>:</h4>
<p>iirc this error .. hmm. I had better look back and not rely on my memory.</p>



<a name="161159649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159649">(Mar 19 2019 at 15:16)</a>:</h4>
<p>I'm not at my computer just now but would be happy to supply more info when I finish breakfast :)</p>



<a name="161159835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159835">(Mar 19 2019 at 15:19)</a>:</h4>
<p>the relevant code (which I am re-reading now) is <a href="https://github.com/rust-lang/rust/blob/ef4d1c419525e1510aa650e2bec0d8f7449a2130/src/librustc/infer/opaque_types/mod.rs#L273-L400" target="_blank" title="https://github.com/rust-lang/rust/blob/ef4d1c419525e1510aa650e2bec0d8f7449a2130/src/librustc/infer/opaque_types/mod.rs#L273-L400">this fn, <code>constrain_opaque_types</code></a></p>



<a name="161159942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159942">(Mar 19 2019 at 15:20)</a>:</h4>
<p>I <em>think</em> we could change how this check works</p>



<a name="161159951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161159951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161159951">(Mar 19 2019 at 15:20)</a>:</h4>
<p>In a way that <em>might</em> help</p>



<a name="161160118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160118">(Mar 19 2019 at 15:23)</a>:</h4>
<p>Yeah. It seems to me that the thing you want is to express that the existential type may not outlive either lifetime, with no particular relationship between the two</p>



<a name="161160171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160171">(Mar 19 2019 at 15:23)</a>:</h4>
<p>Whereas today it seems like it's trying to identify a single lifetime that the existential type outlives</p>



<a name="161160225"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160225" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160225">(Mar 19 2019 at 15:24)</a>:</h4>
<p>OK, so, here is what I am presently thinking</p>



<a name="161160286"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160286" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160286">(Mar 19 2019 at 15:24)</a>:</h4>
<p>the <em>challenge</em> here is that sometimes we don't have enough constraints in inference</p>



<a name="161160321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160321">(Mar 19 2019 at 15:25)</a>:</h4>
<blockquote>
<p>Whereas today it seems like it's trying to identify a single lifetime that the existential type outlives</p>
</blockquote>
<p>yes, it is-- this was a simplification we put in to delay having to deal with this problem :)</p>



<a name="161160330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160330">(Mar 19 2019 at 15:25)</a>:</h4>
<p>but I guess the bill comes due</p>



<a name="161160339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160339">(Mar 19 2019 at 15:25)</a>:</h4>
<p>or maybe we can skip it a bit longer :)</p>



<a name="161160356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160356">(Mar 19 2019 at 15:26)</a>:</h4>
<p>can we dig a bit into the <code>async fn</code> example..</p>



<a name="161160409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160409">(Mar 19 2019 at 15:26)</a>:</h4>
<p>so we have something like</p>
<div class="codehilite"><pre><span></span><span class="n">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">async_fn_multiple_args</span><span class="p">(</span><span class="n">x</span>: <span class="kp">&amp;</span><span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">_y</span>: <span class="kp">&amp;</span><span class="kt">u8</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="kt">u8</span> <span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="o">*</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">*</span><span class="n">y</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="161160470"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160470" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160470">(Mar 19 2019 at 15:27)</a>:</h4>
<p>this gets desugared to something like</p>
<div class="codehilite"><pre><span></span><span class="n">existential</span><span class="w"> </span><span class="k">type</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span>: <span class="nc">Future</span><span class="o">&lt;</span><span class="n">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kt">u8</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">async_fn_multiple_args</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="p">(</span><span class="n">x</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">_y</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u8</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">async</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="o">*</span><span class="n">x</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">*</span><span class="n">y</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="c1">// say</span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="161160503"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160503" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160503">(Mar 19 2019 at 15:27)</a>:</h4>
<p>so the hidden type will be some kind of generator with two upvars</p>



<a name="161160597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160597">(Mar 19 2019 at 15:28)</a>:</h4>
<p>hmm, yeah, this is the hard case :)</p>



<a name="161160632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160632">(Mar 19 2019 at 15:29)</a>:</h4>
<p>the generator type will be something like <code>Generator&lt;&amp;'0 u8, &amp;'1 u8&gt;</code> for some fresh variables <code>'0</code> and <code>'1</code></p>



<a name="161160694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160694">(Mar 19 2019 at 15:29)</a>:</h4>
<p>and we ought to have some constraints that (e.g.) </p>
<div class="codehilite"><pre><span></span>&amp;&#39;a u8 &lt;: &amp;&#39;0 u8
&amp;&#39;b u8 &lt;: &amp;&#39;1 u8
</pre></div>


<p>based on the fact that the first captured variable (<code>x</code>) has type <code>&amp;'a u8</code> etc</p>



<a name="161160768"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160768" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160768">(Mar 19 2019 at 15:30)</a>:</h4>
<p>which means we have region constraints</p>
<div class="codehilite"><pre><span></span>&#39;a: &#39;0
&#39;b: &#39;1
</pre></div>



<a name="161160779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160779">(Mar 19 2019 at 15:30)</a>:</h4>
<p>the challenge here is that <code>'0</code> could (for example) be inferred to <code>'empty</code></p>



<a name="161160789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160789">(Mar 19 2019 at 15:30)</a>:</h4>
<p>which will give us an error later on</p>



<a name="161160842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160842">(Mar 19 2019 at 15:31)</a>:</h4>
<p>specifically, in <a href="https://github.com/rust-lang/rust/blob/ef4d1c419525e1510aa650e2bec0d8f7449a2130/src/librustc/infer/opaque_types/mod.rs#L425" target="_blank" title="https://github.com/rust-lang/rust/blob/ef4d1c419525e1510aa650e2bec0d8f7449a2130/src/librustc/infer/opaque_types/mod.rs#L425">the <code>infer_opaque_definition_from_instantiation</code> function</a> -- it is looking to make sure that all the regions in the hidden type are <code>'a</code> or <code>'b</code> or otherwise something externally nameable</p>



<a name="161160852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160852">(Mar 19 2019 at 15:31)</a>:</h4>
<blockquote>
<p>the challenge here is that <code>'0</code> could (for example) be inferred to <code>'empty</code></p>
</blockquote>
<p>this is probably not quite right, there is probably some bound that it must outlive the fn body</p>



<a name="161160873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161160873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161160873">(Mar 19 2019 at 15:32)</a>:</h4>
<p>so <code>'0</code> and <code>'1</code> would get inferred to the fn body, but that's not an "externally nameable region", which is why we would get an error</p>



<a name="161161015"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161161015" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161161015">(Mar 19 2019 at 15:33)</a>:</h4>
<p>so this is why we are looking to add a constraint like <code>'0: 'a</code> etc. But that's a bit .. tricky for us to do. The easy case is when there is some "minimal" region amongst the set of named regions -- then we can just make sure everything at least outlives <em>that</em></p>



<a name="161161034"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161161034" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161161034">(Mar 19 2019 at 15:33)</a>:</h4>
<p>but what we really <em>want</em> is a constraint like</p>
<div class="codehilite"><pre><span></span>(&#39;0: &#39;a || &#39;0: &#39;b)
</pre></div>


<p>since choosing <code>'0: 'b</code> would lead to an error, we'd pick the first half.</p>



<a name="161161049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161161049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161161049">(Mar 19 2019 at 15:33)</a>:</h4>
<p>the region solver doesn't really like <code>||</code>, but I think we could plausibly extend it to handle this specific case better</p>



<a name="161161061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161161061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161161061">(Mar 19 2019 at 15:34)</a>:</h4>
<p>this was the work I was hoping to put off =)</p>



<a name="161161825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161161825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161161825">(Mar 19 2019 at 15:41)</a>:</h4>
<p>However, I could imagine some kind of simple check -- the idea would be that we have constraints of the form <code>'0 in ('a || 'b)</code>, which means "<code>'0</code> must be one of the following regions". We can then do an elaboration step where we look over the relations to try and rule things out. So, for example, <code>'a: '0</code> means that <code>'0 = 'b</code> is going to be an error. If we can reduce that set from <code>in</code> to a singleton set (as we can do here), then we can easily handle it.</p>
<p>This is a bit tricky because it's not really how our inference normally operates, it doesn't fit in <em>super</em> naturally. (Also, we'd have to integrate it into NLL too, but I guess it would work quite similarly.)</p>



<a name="161161887"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161161887" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161161887">(Mar 19 2019 at 15:42)</a>:</h4>
<p>(Perhaps those constraints are more like <code>'0: ('a || 'b)</code>, which is a subset of equality.)</p>



<a name="161161891"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161161891" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161161891">(Mar 19 2019 at 15:42)</a>:</h4>
<p>e.g., <code>'0 = 'static</code> would also be ok</p>



<a name="161174390"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161174390" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161174390">(Mar 19 2019 at 17:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> did you still want to chat here?</p>



<a name="161174414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161174414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161174414">(Mar 19 2019 at 17:52)</a>:</h4>
<p>(following up from your comment in the mtg)</p>



<a name="161181763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161181763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161181763">(Mar 19 2019 at 19:18)</a>:</h4>
<p><code>'0 in ('a || 'b)</code> should actually be <code>'0 in ('a || 'b || 'empty)</code>, right?</p>



<a name="161181822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161181822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161181822">(Mar 19 2019 at 19:19)</a>:</h4>
<p>but I'd have suspected this logic would already exist for type parameters</p>



<a name="161181920"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161181920" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161181920">(Mar 19 2019 at 19:20)</a>:</h4>
<p>related to the bits <span class="user-mention" data-user-id="124288">@oli</span> and I had discussed before about the rules around e.g. type parameters all being left generic in the scope of the definition site</p>



<a name="161181928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161181928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161181928">(Mar 19 2019 at 19:20)</a>:</h4>
<p>all the same rules would apply here</p>



<a name="161192669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161192669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161192669">(Mar 19 2019 at 21:39)</a>:</h4>
<blockquote>
<p>but I'd have suspected this logic would already exist for type parameters</p>
</blockquote>
<p>there is some similar-ish logic for projections</p>



<a name="161192678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161192678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161192678">(Mar 19 2019 at 21:39)</a>:</h4>
<blockquote>
<p><code>'0 in ('a || 'b)</code> should actually be <code>'0 in ('a || 'b || 'empty)</code>, right?</p>
</blockquote>
<p><code>'empty</code> no, but <code>'static</code> yes</p>



<a name="161192691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161192691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161192691">(Mar 19 2019 at 21:39)</a>:</h4>
<p>I mean maybe <code>'empty</code> "maybe" is a better version</p>



<a name="161192796"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161192796" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161192796">(Mar 19 2019 at 21:40)</a>:</h4>
<p>oh I guess maybe you mean logic to pick the type parameters .. I guess i'm not quite sure what you mean about type parametesr</p>



<a name="161193619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161193619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161193619">(Mar 19 2019 at 21:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> there are rules around e.g. <code>fn foo&lt;A, B&gt;(a: A, b: B) -&gt; Foo&lt;A, B&gt; { .. }</code> being allowed with all the following bodies: <code>(a, b)</code>, <code>a</code>, and <code>b</code></p>



<a name="161193694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161193694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161193694">(Mar 19 2019 at 21:52)</a>:</h4>
<p>but <code>fn foo&lt;A&gt;(a: A) -&gt; Foo&lt;A, A&gt; { ... }</code> is not allowed, since it's unknown whether or not from a body like <code>(a, a)</code> the underlying type varies with respect to the first type parameter, the second, or both</p>



<a name="161193745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161193745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161193745">(Mar 19 2019 at 21:53)</a>:</h4>
<p>(e.g. it could be <code>type Foo&lt;A, B&gt; = (A, B);</code>, <code>type Foo&lt;A, B&gt; = (B, A);</code>, <code>type Foo&lt;A, B&gt; = (A, A)</code>, or <code>type Foo&lt;A, B&gt; = (B, B);</code>)</p>



<a name="161193751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161193751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161193751">(Mar 19 2019 at 21:53)</a>:</h4>
<p>all are equally valid</p>



<a name="161193825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161193825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161193825">(Mar 19 2019 at 21:54)</a>:</h4>
<p>for the generalized version in <code>existential type Foo&lt;'a, 'b&gt; = (&amp;'a u8, &amp;'b u8)</code> we have the same problem</p>



<a name="161201045"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161201045" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161201045">(Mar 19 2019 at 23:33)</a>:</h4>
<p>i've pushed up a new version of <a href="https://github.com/rust-lang/rust/pull/59286" target="_blank" title="https://github.com/rust-lang/rust/pull/59286">https://github.com/rust-lang/rust/pull/59286</a> which has some more tests as well as an improved error message for the multiple-lifetimes case.</p>



<a name="161201106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161201106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161201106">(Mar 19 2019 at 23:34)</a>:</h4>
<p>Getting that in fixes all of the outstanding lifetime bugs around <code>async fn</code> except for the multiple lifetimes issue.</p>



<a name="161284491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161284491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161284491">(Mar 20 2019 at 19:49)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> I'll try to respond to these comments tomorrow or so, btw, and maybe do some experimenting with the region solver</p>



<a name="161290188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161290188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161290188">(Mar 20 2019 at 20:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay, sg</p>



<a name="161362742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161362742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161362742">(Mar 21 2019 at 16:31)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> do you have time to look at <a href="https://github.com/rust-lang/rust/pull/59286" target="_blank" title="https://github.com/rust-lang/rust/pull/59286">https://github.com/rust-lang/rust/pull/59286</a> today? I'm headed out of town soon and wanted to make sure I'd done everything I could to try and get this all fixed up before then.</p>



<a name="161365556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161365556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161365556">(Mar 21 2019 at 17:02)</a>:</h4>
<p>I should be able to review in about 5 hours, if that's soon enough</p>



<a name="161365571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161365571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161365571">(Mar 21 2019 at 17:02)</a>:</h4>
<p>sorry, the past couple of days have been a little busy</p>



<a name="161369586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/161369586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#161369586">(Mar 21 2019 at 17:47)</a>:</h4>
<p><span class="user-mention" data-user-id="121053">@varkor</span> no worries, 5 hours is fine!</p>



<a name="162011989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162011989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Charles Lew <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162011989">(Mar 29 2019 at 02:37)</a>:</h4>
<p>For a practical usage scenario of multiple lifetime async functions: see<br>
<a href="#narrow/stream/193127-wg-database/topic/async.20database.20interface" title="#narrow/stream/193127-wg-database/topic/async.20database.20interface">https://rust-lang.zulipchat.com/#narrow/stream/193127-wg-database/topic/async.20database.20interface</a></p>



<a name="162856141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162856141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162856141">(Apr 08 2019 at 21:19)</a>:</h4>
<p>OK so <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> -- we should schedule a time to talk about this -- I wonder if I should do some experimentation first</p>



<a name="162856142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162856142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162856142">(Apr 08 2019 at 21:19)</a>:</h4>
<p>Are there days that work better for you?</p>



<a name="162856204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162856204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162856204">(Apr 08 2019 at 21:20)</a>:</h4>
<p>I'm pretty busy on Thursdays but besides that my schedule is generally pretty light</p>



<a name="162950147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162950147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162950147">(Apr 09 2019 at 21:07)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> what about this Friday at (say) 13:00 Boston time?</p>



<a name="162950203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162950203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162950203">(Apr 09 2019 at 21:07)</a>:</h4>
<p>actually, maybe tomorrow at 2pm?</p>



<a name="162950222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162950222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162950222">(Apr 09 2019 at 21:07)</a>:</h4>
<p>given that you said your schedule is light, i'm going to hope that works :)</p>



<a name="162950378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/162950378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#162950378">(Apr 09 2019 at 21:09)</a>:</h4>
<p><a href="https://calendar.google.com/event?action=TEMPLATE&amp;tmeid=M21oaDZjODd2ZDkwdGQ3OGlmMmNvam11NWIgNnU1cnJ0Y2U2bHJ0djA3cGZpM2RhbWdqdXNAZw&amp;tmsrc=6u5rrtce6lrtv07pfi3damgjus%40group.calendar.google.com" target="_blank" title="https://calendar.google.com/event?action=TEMPLATE&amp;tmeid=M21oaDZjODd2ZDkwdGQ3OGlmMmNvam11NWIgNnU1cnJ0Y2U2bHJ0djA3cGZpM2RhbWdqdXNAZw&amp;tmsrc=6u5rrtce6lrtv07pfi3damgjus%40group.calendar.google.com">Link to calendar event</a></p>



<a name="163028734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163028734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163028734">(Apr 10 2019 at 17:58)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> so I think i may have trouble getting a room for a video call</p>



<a name="163028738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163028738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163028738">(Apr 10 2019 at 17:58)</a>:</h4>
<p>let me go double check</p>



<a name="163028986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163028986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163028986">(Apr 10 2019 at 18:01)</a>:</h4>
<p>well I'll just find a secluded corner</p>



<a name="163029363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029363">(Apr 10 2019 at 18:04)</a>:</h4>
<p>ok, don't see anyone there anyway</p>



<a name="163029376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029376">(Apr 10 2019 at 18:04)</a>:</h4>
<p>so I'll just try to do this on my own and leave some notes :)</p>



<a name="163029637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029637">(Apr 10 2019 at 18:06)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> heh</p>



<a name="163029655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029655">(Apr 10 2019 at 18:06)</a>:</h4>
<p>I must've joined the call just after you left</p>



<a name="163029707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029707">(Apr 10 2019 at 18:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> did you want to chat here, in zulip, on a doc somewhere?</p>



<a name="163029715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029715">(Apr 10 2019 at 18:07)</a>:</h4>
<p>or in zoom?</p>



<a name="163029716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029716">(Apr 10 2019 at 18:07)</a>:</h4>
<p>oh, no worries</p>



<a name="163029720"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029720" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029720">(Apr 10 2019 at 18:07)</a>:</h4>
<p>we could chat in zoom or here</p>



<a name="163029727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029727">(Apr 10 2019 at 18:07)</a>:</h4>
<p>I was just re-reading what I wrote before and trying to remember wtf was going on</p>



<a name="163029752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029752">(Apr 10 2019 at 18:08)</a>:</h4>
<p>let's just do zoom</p>



<a name="163029797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029797">(Apr 10 2019 at 18:08)</a>:</h4>
<p>should we make a paper?</p>



<a name="163029869"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163029869" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163029869">(Apr 10 2019 at 18:09)</a>:</h4>
<p><a href="https://paper.dropbox.com/doc/Multiple-Unrelated-Lifetimes-in-Existential-Types--Aa9M~6y6bRQ_y1eiaCzMpZgyAQ-AuCQq4Ewy39j8Hnj3n9Qg" target="_blank" title="https://paper.dropbox.com/doc/Multiple-Unrelated-Lifetimes-in-Existential-Types--Aa9M~6y6bRQ_y1eiaCzMpZgyAQ-AuCQq4Ewy39j8Hnj3n9Qg">https://paper.dropbox.com/doc/Multiple-Unrelated-Lifetimes-in-Existential-Types--Aa9M~6y6bRQ_y1eiaCzMpZgyAQ-AuCQq4Ewy39j8Hnj3n9Qg</a></p>



<a name="163030000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030000">(Apr 10 2019 at 18:10)</a>:</h4>
<p>for some reason</p>



<a name="163030010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030010">(Apr 10 2019 at 18:10)</a>:</h4>
<p>zoom doesn't want to start for me</p>



<a name="163030021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030021">(Apr 10 2019 at 18:10)</a>:</h4>
<p>/me grumbles</p>



<a name="163030087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030087">(Apr 10 2019 at 18:10)</a>:</h4>
<p>heh, it just kicked me out</p>



<a name="163030180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030180">(Apr 10 2019 at 18:11)</a>:</h4>
<p>ok sorry</p>



<a name="163030184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030184">(Apr 10 2019 at 18:11)</a>:</h4>
<p>that was my fault</p>



<a name="163030188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030188">(Apr 10 2019 at 18:11)</a>:</h4>
<p>try to join again, should be good now</p>



<a name="163030265"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163030265" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163030265">(Apr 10 2019 at 18:12)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="163507757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163507757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163507757">(Apr 16 2019 at 21:15)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/56238#issuecomment-483846160" target="_blank" title="https://github.com/rust-lang/rust/issues/56238#issuecomment-483846160">left some initial notes here</a>, <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> -- I guess not a <em>ton</em> new there, but I did go refresh my memory as to how the NLL solver works</p>



<a name="163508766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163508766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163508766">(Apr 16 2019 at 21:27)</a>:</h4>
<p>thanks! :)</p>



<a name="163508807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/163508807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#163508807">(Apr 16 2019 at 21:28)</a>:</h4>
<p>(<span class="user-mention" data-user-id="116009">@nikomatsakis</span> )</p>



<a name="164112753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/164112753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#164112753">(Apr 24 2019 at 19:35)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> thanks for the comment <a href="https://github.com/rust-lang/rust/issues/56238#issuecomment-486392893" target="_blank" title="https://github.com/rust-lang/rust/issues/56238#issuecomment-486392893">https://github.com/rust-lang/rust/issues/56238#issuecomment-486392893</a></p>



<a name="165093660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/165093660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#165093660">(May 07 2019 at 17:44)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> ps, if I were to carve out time for this, I think it would be on Friday</p>



<a name="165094426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/165094426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#165094426">(May 07 2019 at 17:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay</p>



<a name="165094449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/165094449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#165094449">(May 07 2019 at 17:53)</a>:</h4>
<p>I'll continue to investigate later today, but my expectation would be that I wouldn't get very far :(</p>



<a name="166104500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/166104500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#166104500">(May 20 2019 at 17:43)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> did you push on this any further?</p>



<a name="166277734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/166277734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#166277734">(May 22 2019 at 15:16)</a>:</h4>
<p>ping <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="166857199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/166857199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#166857199">(May 29 2019 at 21:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<a name="166860728"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/166860728" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#166860728">(May 29 2019 at 21:54)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> I started working on it, yeah.</p>



<a name="166860737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/166860737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#166860737">(May 29 2019 at 21:55)</a>:</h4>
<p>I didn't get too far but I plan to spend more time tomorrow/Friday</p>



<a name="167226874"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167226874" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167226874">(Jun 03 2019 at 20:15)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> so I think I have the interation into the lexical solver basically working.</p>



<a name="167226889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167226889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167226889">(Jun 03 2019 at 20:15)</a>:</h4>
<p>Not the most efficient thing ever, but probably good enough.</p>



<a name="167226908"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167226908" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167226908">(Jun 03 2019 at 20:15)</a>:</h4>
<p>Though I've .. actually not tested it on the async example, I should do that</p>



<a name="167226912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167226912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167226912">(Jun 03 2019 at 20:15)</a>:</h4>
<p>I still have to do the integration into the NLL solver though</p>



<a name="167798519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167798519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167798519">(Jun 10 2019 at 21:32)</a>:</h4>
<p>OK, the NLL Solver integration is like 50% done</p>



<a name="167905364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167905364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167905364">(Jun 12 2019 at 01:05)</a>:</h4>
<p><span class="user-mention" data-user-id="127859">@Taylor Cramer</span> this test is passing now</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Trait</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="k">impl</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Trait</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;_</span><span class="o">&gt;</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="n">T</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="c1">// Here we wind up selecting `&#39;a` and `&#39;b` in the hidden type because</span>
<span class="c1">// those are the types that appear inth e original values.</span>

<span class="k">fn</span> <span class="nf">upper_bounds</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="p">(</span><span class="n">a</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="kp">&amp;</span><span class="na">&#39;b</span><span class="w"> </span><span class="kt">u8</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">impl</span><span class="w"> </span><span class="n">Trait</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="c1">// In this simple case, you have a hidden type `(&amp;&#39;0 u8, &amp;&#39;1 u8)` and constraints like</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// ```</span>
<span class="w">    </span><span class="c1">// &#39;a: &#39;0</span>
<span class="w">    </span><span class="c1">// &#39;b: &#39;1</span>
<span class="w">    </span><span class="c1">// &#39;0 in [&#39;a, &#39;b]</span>
<span class="w">    </span><span class="c1">// &#39;1 in [&#39;a, &#39;b]</span>
<span class="w">    </span><span class="c1">// ```</span>
<span class="w">    </span><span class="c1">//</span>
<span class="w">    </span><span class="c1">// We use the fact that `&#39;a: 0&#39;` must hold (combined with the in</span>
<span class="w">    </span><span class="c1">// constraint) to determine that `&#39;0 = &#39;a` must be the answer.</span>
<span class="w">    </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="167917979"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167917979" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167917979">(Jun 12 2019 at 05:59)</a>:</h4>
<p>\o/</p>



<a name="167953913"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167953913" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167953913">(Jun 12 2019 at 14:47)</a>:</h4>
<p>Update: this test is passing too (actually, it probably was before, but I wasn't running it)</p>
<div class="codehilite"><pre><span></span><span class="c1">// edition:2018</span>
<span class="c1">// run-pass</span>

<span class="c1">// Test that we can use async fns with multiple arbitrary lifetimes.</span>

<span class="cp">#![feature(arbitrary_self_types, async_await, await_macro)]</span><span class="w"></span>

<span class="k">use</span><span class="w"> </span><span class="n">std</span>::<span class="n">ops</span>::<span class="n">Add</span><span class="p">;</span><span class="w"></span>

<span class="n">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">multiple_named_lifetimes</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">_</span>: <span class="kp">&amp;</span><span class="na">&#39;b</span><span class="w"> </span><span class="kt">u8</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="n">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">multiple_hrtb_and_single_named_lifetime_ok</span><span class="o">&lt;</span><span class="na">&#39;c</span><span class="o">&gt;</span><span class="p">(</span><span class="w"></span>
<span class="w">    </span><span class="n">_</span>: <span class="nc">impl</span><span class="w"> </span><span class="k">for</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Add</span><span class="o">&lt;&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u8</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">_</span>: <span class="nc">impl</span><span class="w"> </span><span class="k">for</span><span class="o">&lt;</span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Add</span><span class="o">&lt;&amp;</span><span class="na">&#39;b</span><span class="w"> </span><span class="kt">u8</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">_</span>: <span class="kp">&amp;</span><span class="na">&#39;c</span><span class="w"> </span><span class="kt">u8</span><span class="p">,</span><span class="w"></span>
<span class="p">)</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="n">async</span><span class="w"> </span><span class="k">fn</span> <span class="nf">multiple_elided_lifetimes</span><span class="p">(</span><span class="n">_</span>: <span class="kp">&amp;</span><span class="kt">u8</span><span class="p">,</span><span class="w"> </span><span class="n">_</span>: <span class="kp">&amp;</span><span class="kt">u8</span><span class="p">)</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</pre></div>



<a name="167954014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167954014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167954014">(Jun 12 2019 at 14:48)</a>:</h4>
<p>I just need to dot some i's and cross some t's I guess</p>



<a name="167954035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167954035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167954035">(Jun 12 2019 at 14:48)</a>:</h4>
<p>I realized a complication around things like <code>let x: impl Trait</code> -- but for now I think i'll just force the old behavior in such cases</p>



<a name="167954531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167954531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167954531">(Jun 12 2019 at 14:54)</a>:</h4>
<p>Argh, that existing code is just ICEing though when I try to make tests (lotsa bugs lurking there)</p>



<a name="167954614"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167954614" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167954614">(Jun 12 2019 at 14:55)</a>:</h4>
<p>I guess maybe I'll just file an issue for now</p>



<a name="167954712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167954712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167954712">(Jun 12 2019 at 14:56)</a>:</h4>
<p>I guess I'm basically hitting <a href="https://github.com/rust-lang/rust/issues/60473" target="_blank" title="https://github.com/rust-lang/rust/issues/60473">https://github.com/rust-lang/rust/issues/60473</a></p>



<a name="167960625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167960625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167960625">(Jun 12 2019 at 15:51)</a>:</h4>
<p>Posted <a href="https://github.com/rust-lang/rust/pull/61775" target="_blank" title="https://github.com/rust-lang/rust/pull/61775">https://github.com/rust-lang/rust/pull/61775</a></p>



<a name="167961804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/167961804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#167961804">(Jun 12 2019 at 16:03)</a>:</h4>
<blockquote>
<p>The problem here is that every region R in the hidden type must be equal to either 'a or 'b (or 'static) -- in the past, the only kinds of constraints we had were outlives constraints, and since 'a and 'b are unrelated, there was no outlives constraint we could issue that would enforce that (R: 'a and R: 'b are both too strict, for example). But now we can issue a pick constraint: pick R from ['a, 'b].</p>
</blockquote>
<p>Can you discuss this more in depth and in relation to <code>exists&lt;...&gt;</code> ?</p>



<a name="168516585"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168516585" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168516585">(Jun 19 2019 at 15:22)</a>:</h4>
<p>oh btw <span class="user-mention" data-user-id="127859">@Taylor Cramer</span> I tried to add the feature gate but was surprised to find that the return type spans for async fn didn't seem to have the "desugaring" option on them</p>



<a name="168516594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168516594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168516594">(Jun 19 2019 at 15:22)</a>:</h4>
<p>I have to look at a bit more deeply at that</p>



<a name="168516601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168516601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168516601">(Jun 19 2019 at 15:22)</a>:</h4>
<p>(I was going to make it feature-gated <em>unless</em> part of the desugaring)</p>



<a name="168519930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168519930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168519930">(Jun 19 2019 at 16:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> indeed, there are a few other nodes that could be marked with <code>CompilerDesugaringKind::Async</code> here: <a href="https://github.com/rust-lang/rust/blob/master/src/librustc/hir/lowering.rs#L2601" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc/hir/lowering.rs#L2601">https://github.com/rust-lang/rust/blob/master/src/librustc/hir/lowering.rs#L2601</a></p>



<a name="168519943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168519943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168519943">(Jun 19 2019 at 16:01)</a>:</h4>
<p>today it only does that for the existential type</p>



<a name="168520042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168520042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Cramer <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168520042">(Jun 19 2019 at 16:02)</a>:</h4>
<p>I can send a PR for that if you'd like, otherwise it seems like a fine small thing to include in your change</p>



<a name="168523967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168523967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168523967">(Jun 19 2019 at 16:54)</a>:</h4>
<p>the PR is at that annoying stage where it's accumulating a long list of "random commits"</p>



<a name="168523968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168523968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168523968">(Jun 19 2019 at 16:54)</a>:</h4>
<p>this is just one more I guess :)</p>



<a name="168527419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168527419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168527419">(Jun 19 2019 at 17:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> It's a good idea to do break-out PRs ^^</p>



<a name="168605361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168605361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168605361">(Jun 20 2019 at 15:22)</a>:</h4>
<p>I have pushed the feature gate as well as a first draft of a <a href="https://github.com/rust-lang/rustc-guide/pull/344" target="_blank" title="https://github.com/rust-lang/rustc-guide/pull/344">rustc-guide chapter</a>, though I see the PR needs to be updated</p>



<a name="168947451"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168947451" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168947451">(Jun 25 2019 at 15:11)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what's with the <code>arbitrary_self_types</code> and <code>await_macro</code> in <a href="https://github.com/rust-lang/rust/pull/61775/commits/256abeffcdc1b1eb79a98baf07b870a045933147" target="_blank" title="https://github.com/rust-lang/rust/pull/61775/commits/256abeffcdc1b1eb79a98baf07b870a045933147">https://github.com/rust-lang/rust/pull/61775/commits/256abeffcdc1b1eb79a98baf07b870a045933147</a> -- are those needed?</p>



<a name="168947539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168947539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168947539">(Jun 25 2019 at 15:12)</a>:</h4>
<p>also btw, in case it was lost in the sea of nits I had... ( :P ) : <a href="https://github.com/rust-lang/rust/pull/61775#discussion_r295907400" target="_blank" title="https://github.com/rust-lang/rust/pull/61775#discussion_r295907400">https://github.com/rust-lang/rust/pull/61775#discussion_r295907400</a></p>



<a name="168953916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168953916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168953916">(Jun 25 2019 at 16:36)</a>:</h4>
<blockquote>
<p>what's with the <code>arbitrary_self_types</code> and <code>await_macro</code> in <a href="https://github.com/rust-lang/rust/pull/61775/commits/256abeffcdc1b1eb79a98baf07b870a045933147" target="_blank" title="https://github.com/rust-lang/rust/pull/61775/commits/256abeffcdc1b1eb79a98baf07b870a045933147">https://github.com/rust-lang/rust/pull/61775/commits/256abeffcdc1b1eb79a98baf07b870a045933147</a> -- are those needed?</p>
</blockquote>
<p>no, they're just cargo culted. I fixed some of the tests but not all.</p>



<a name="168953933"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168953933" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168953933">(Jun 25 2019 at 16:36)</a>:</h4>
<blockquote>
<p>also btw, in case it was lost in the sea of nits I had... ( :P ) : <a href="https://github.com/rust-lang/rust/pull/61775#discussion_r295907400" target="_blank" title="https://github.com/rust-lang/rust/pull/61775#discussion_r295907400">https://github.com/rust-lang/rust/pull/61775#discussion_r295907400</a></p>
</blockquote>
<p>it was not, I was just waiting to address the important question in a bit more depth</p>



<a name="168953947"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168953947" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168953947">(Jun 25 2019 at 16:37)</a>:</h4>
<p>though the TL;DR is that I don't see a problem</p>



<a name="168956358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/168956358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> centril <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#168956358">(Jun 25 2019 at 17:04)</a>:</h4>
<p>Thanks for the tl;dr; I'll wait for the elaboration in the code-comment/the PR <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="169256029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/169256029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#169256029">(Jun 28 2019 at 19:42)</a>:</h4>
<p>OK so I think I am ready to land this PR. :)</p>



<a name="169256389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187312-wg-async-foundations/topic/Lifetime%20Fixes/near/169256389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187312-wg-async-foundations/topic/Lifetime.20Fixes.html#169256389">(Jun 28 2019 at 19:47)</a>:</h4>
<p>I keep having this feeling like I could write more thorough tests, though I'm not sure -- I guess I could dig into making sure that each of the scenarios is covered.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>